<template>
  <!-- 拒绝原因弹窗 -->
  <div class="model-wrap" :class="isOpenModel ? 'active': ''">
    <div class="edit-wrap" :class="isOpenModel ? 'active': ''">
      <div class="title">{{modelTitle}}</div>
      <div class="top-input">
        <slot></slot>
      </div>

      <div class="submit-option">
        <el-button
          class="el-btn"
          @click="handleSubmit"
          style="width: 80px; height: 30px; padding-top:8px; color: #101010;"
        >确定</el-button>
        <el-button
          class="el-btn"
          @click="handleCancel"
          style="width: 80px; height: 30px; padding-top:8px; color: #101010;"
        >取消</el-button>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  components: {},
  props: {
    isOpenModel: {
      type: Boolean,
    },
    modelTitle: {
      type: String,
    },
  },
  data() {
    return {};
  },
  mounted() {},
  methods: {
    handleSubmit() {
      this.$emit("handleSubmit");
    },
    handleCancel() {
      this.$emit("handleCancel");
    },
  },
};
</script>

<style lang="scss" scoped>
// @import '~styles/mixins.scss';
// @import '~styles/variables.scss';

.content {
  position: relative;
}

.model-wrap {
  height: 0;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1;
  transition: all 0.4s ease-in-out;
  overflow: hidden;

  &.active {
    height: 100%;
    transition: all 0.4s ease-in-out;
  }
}

.edit-wrap {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  margin-left: -275px;
  margin-top: -175px;
  width: 550px;
  min-height: 353px;
  // border-radius: 10px;
  border: 1px solid #ddd;
  background-color: #fff;
  z-index: 1;
  box-sizing: border-box;

  &.active {
    display: block;
  }

  .title {
    font-size: 16px;
    height: 52px;
    line-height: 52px;
    color: #101010;
    text-align: center;
    border-bottom: 1px solid #ddd;
  }

  .top-input {
    min-height: 247px;
    border-bottom: 1px solid #ddd;
    padding-top: 20px;
    box-sizing: border-box;

    .item {
      margin-top: 12px;
      margin-left: 72px;
      font-size: 14px;

      span {
        color: #f10;
      }

      &.img-item {
        position: relative;
      }

      label {
        display: inline-block;
        width: 95px;
        font-weight: normal;
        text-align: right;
      }

      .msg {
        padding-left: 0px;
      }

      .upload-img-box {
        position: absolute;
        top: 0;
        left: 60px;
        width: 107px;
        height: 107px;
        overflow: hidden;

        img {
          height: 100%;
        }
      }
    }
  }

  .submit-option {
    height: 53px;
    display: flex;
    align-items: center;
    float: right;
    padding-right: 14px;
  }
}

.clearfix::after {
  content: "";
  display: table;
  clear: both;
}

//调整element 样式
.inline-block {
  display: inline-block;
  margin-left: 22px;

  &.id {
    padding-left: 20px;
  }

  el-input {
    width: 20px !important;
  }
}

//省略号
.ellipsis {
  vertical-align: -4px;
  width: 220px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.top-input {
  .img-title {
    font-size:14px; 
    text-align: center;
    line-height: 20px;
    margin: 20px 0;
  }
  .little-img-item {
    // background-color: #000;
    margin: 10px;
    .img-wrap {
      border: 1px solid #efefef;
      margin: 0 auto;
      width: 160px;
      height: 160px;
      border-radius: 4px;
      display: flex;
      align-items: center;
      padding: 10px;
      img {
        width: 100%;
      }
    }
  }
}
</style>

